import { deleteRequest, postRequest, putRequest } from "@/utils/api.js"

// 获取告警收敛策略信息(分页)
export function getStrategyByPage(params = {}) {
	return postRequest('/alarm/convergence/getPageData', params);
}

// 新增告警收敛策略信息
export function addStrategy(params = {}) {
	return postRequest('/alarm/convergence', params);
}

// 更新告警收敛策略信息
export function updateStrategy(params = {}) {
	return putRequest('/alarm/convergence', params);
}

// 删除告警收敛策略信息
export function deleteStrategy(id) {
	return deleteRequest('/alarm/convergence/' + id);
}

// 收敛配置更新启用开关
export function strategyEnabled(params = {}) {
	return postRequest('/alarm/convergence/enabled', params);
}